import { http } from '@/utils/http'

// 添加宝宝接口
export const getbabyadd = (data: any) => {
  return http({
    url: '/wap/user/baby/add',
    method: 'POST',
    data,
  })
}
// 宝宝列表
export const getbabylist = () => {
  return http({
    url: '/wap/user/baby/list',
    method: 'GET'
  })
}
// 小程序登录接口
export const login = (data: any) => {
  return http({
    url: '/wap/wx/login',
    method: 'POST',
    data,
  })
}
// 小程序退出接口
export const loginOut = (data: any) => {
  return http({
    url: '/wap/wx/loginOut',
    method: 'POST',
    data,
  })
}
// 大课分组列表接口
export const agegrouplist = (id: any) => {
  return http({
    url: `/wap/course/agegrouplist/${id}`,
    method: 'GET'
  })
}
// 课节详情接口
export const lessonSchedule = (id: any) => {
  return http({
    url: `/wap/course/lessonSchedule/${id}`,
    method: 'GET'
  })
}
// 大课列表
export const bigCourselist = () => {
  return http({
    url: `/wap/course/bigCourse`,
    method: 'GET'
  })
}
// 大课
export const bigCourse = (babyId: any) => {
  return http({
    url: `/wap/course/indexCourse/${babyId}`,
    method: 'GET'
  })
}
// 兑换码兑换大课
export const exchange = (id: any, code: any) => {
  return http({
    url: `/wap/course/exchange/${id}/${code}`,
    method: 'GET'
  })
}
// 大课详情接口
export const detailGroup = (data: any) => {
  return http({
    url: '/wap/course/detailGroup',
    method: 'POST',
    data,
  })
}
// 收藏接口
export const target = (id: any, type: any) => {
  return http({
    url: `/wap/favorites/target/${id}/${type}`,
    method: 'GET',
  })
}
// 收藏列表查询
export const favoriteslist = (data: any) => {
  return http({
    url: '/wap/favorites/page',
    method: 'POST',
    data,
  })
}

// 获取宝宝接口
export const reqinfos = () => {
  return http({
    url: `/wap/user/baby/info`,
    method: 'GET',
  })
}
// 修改宝宝接口
export const updatebaby = (data: any) => {
  return http({
    url: '/wap/user/baby/update',
    method: 'POST',
    data,
  })
}
// base64png
export const base64png = (data: any) => {
  return http({
    url: '/wap/common/fileupload/base64png',
    method: 'POST',
    data,
  })
}
// 小程序修改头像和昵称接口
export const updateuser = (data: any) => {
  return http({
    url: '/wap/user/user/update',
    method: 'POST',
    data,
  })
}